<template>
	<view class="evaluation-container">
		<view class="evaluation-header">
			<text class="header-title">综合评估</text>
			<text class="header-subtitle">请完成以下量表评估</text>
		</view>
		
		<view class="menu-list">
			<uni-title type="h2" title="评估一次"></uni-title>
		  <view class="list-cell list-cell-arrow" @click="goToScale(12)">
		    <view class="menu-item-box">
		      <view class="iconfont icon-aixin menu-icon"></view>
		      <view>一般资料调查问卷</view>
		    </view>
		  </view>
		  <view class="list-cell list-cell-arrow" @click="goToScale(22)">
		    <view class="menu-item-box">
		      <view class="iconfont icon-setting menu-icon"></view>
		      <view>不良事件特征问卷</view>
		    </view>
		  </view>
		</view>
			
		<view class="menu-list">
			<uni-title type="h2" title="多次评估"></uni-title>
		  <view class="list-cell list-cell-arrow" @click="goToScale(23)">
		    <view class="menu-item-box">
		      <view class="iconfont icon-aixin menu-icon"></view>
		      <view>第二受害者经历与支持测评量表</view>
		    </view>
		  </view>
		  <view class="list-cell list-cell-arrow" @click="goToScale(24)">
		    <view class="menu-item-box">
		      <view class="iconfont icon-setting menu-icon"></view>
		      <view>职业倦怠感量表</view>
		    </view>
		  </view>
			<view class="list-cell list-cell-arrow" @click="goToScale(25)">
			  <view class="menu-item-box">
			    <view class="iconfont icon-setting menu-icon"></view>
			    <view>焦虑自评量表</view>
			  </view>
			</view>
			<view class="list-cell list-cell-arrow" @click="goToScale(26)">
			  <view class="menu-item-box">
			    <view class="iconfont icon-setting menu-icon"></view>
			    <view>抑郁自评量表</view>
			  </view>
			</view>
		</view>
		
		<!-- <view class="scale-list">
			<view v-for="(item,index) in list" class="scale-item" @click="goToScale(item.id)">
				<view class="scale-content">
					<text class="scale-title">{{item.title}}</text>
					<text class="scale-description">{{item.content}}</text>
				</view>
				<view class="scale-arrow">
					<text class="arrow-icon">></text>
				</view>
			</view>
		</view> -->
	</view>
</template>

<script>
	import {getFormList} from "@/api/secondVitim/comevaluation/index.js"
	
	export default {
		data() {
			return {
				list: []
			}
		},
		onLoad() {
			uni.setNavigationBarTitle({
				title: '综合评估'
			})
			// getFormList().then(response => {
			// 	if(response.code == 200){
			// 		this.list = response.rows;
			// 	}
			// });
		},
		methods: {
			// 跳转到具体量表页面
			goToScale(questionId) {
				uni.navigateTo({
					url: '/pages/comevaluation/dynamicForm?formId=' + questionId
				})
			}
		}
	}
</script>

<style scoped>
.evaluation-container {
	min-height: 100vh;
	background-color: #f5f5f5;
}

.evaluation-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	padding: 30px 20px;
	text-align: center;
}

.header-title {
	color: #ffffff;
	font-size: 24px;
	font-weight: bold;
	display: block;
	margin-bottom: 8px;
}

.header-subtitle {
	color: #ffffff;
	font-size: 14px;
	opacity: 0.9;
}

.scale-list {
	padding: 20px;
}

.scale-item {
	background: #ffffff;
	border-radius: 12px;
	padding: 20px;
	margin-bottom: 15px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
	display: flex;
	align-items: center;
	justify-content: space-between;
	transition: transform 0.2s ease;
}

.scale-item:active {
	transform: scale(0.98);
}

.scale-content {
	flex: 1;
}

.scale-title {
	color: #333333;
	font-size: 16px;
	font-weight: bold;
	margin-bottom: 8px;
	display: block;
}

.scale-description {
	color: #666666;
	font-size: 14px;
	line-height: 1.4;
}

.scale-arrow {
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.arrow-icon {
	color: #4CAF50;
	font-size: 18px;
	font-weight: bold;
}
</style>
